﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace gd.Utils
{
    public class ConvertX
    { 
        public static T ModelToModel<T>(object src)
        {
            var json = Newtonsoft.Json.JsonConvert.SerializeObject(src);
            T target = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(json);
            return target;
        }
    }
}
